/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.sac.be;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Colao
 */
@Entity
@Table(name = "SAC_PARAMETRO_SCORING", catalog = "SIGEMFI", schema = "dbo")
@NamedQueries({@NamedQuery(name = "ParametroScoring.findAll", query = "SELECT p FROM ParametroScoring p"), @NamedQuery(name = "ParametroScoring.findByIdParametroScoring", query = "SELECT p FROM ParametroScoring p WHERE p.idParametroScoring = :idParametroScoring"), @NamedQuery(name = "ParametroScoring.findByNombre", query = "SELECT p FROM ParametroScoring p WHERE p.nombre = :nombre"), @NamedQuery(name = "ParametroScoring.findByDescripcion", query = "SELECT p FROM ParametroScoring p WHERE p.descripcion = :descripcion"), @NamedQuery(name = "ParametroScoring.findByFechaRegistro", query = "SELECT p FROM ParametroScoring p WHERE p.fechaRegistro = :fechaRegistro")})
public class ParametroScoring implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_PARAMETRO_SCORING", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long idParametroScoring;
    @Column(name = "NOMBRE", length = 50)
    private String nombre;
    @Column(name = "DESCRIPCION", length = 200)
    private String descripcion;
    @Column(name = "FECHA_REGISTRO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaRegistro;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "parametroScoring", fetch = FetchType.LAZY)
    private List<ProductoParametro> productoParametroCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "parametroScoring", fetch = FetchType.LAZY)
    private List<SolicitudParametro> solicitudParametroCollection;

    public ParametroScoring() {
    }

    public ParametroScoring(Long idParametroScoring) {
        this.idParametroScoring = idParametroScoring;
    }

    public Long getIdParametroScoring() {
        return idParametroScoring;
    }

    public void setIdParametroScoring(Long idParametroScoring) {
        this.idParametroScoring = idParametroScoring;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public Date getFechaRegistro() {
        return fechaRegistro;
    }

    public void setFechaRegistro(Date fechaRegistro) {
        this.fechaRegistro = fechaRegistro;
    }

    public List<ProductoParametro> getProductoParametroCollection() {
        return productoParametroCollection;
    }

    public void setProductoParametroCollection(List<ProductoParametro> productoParametroCollection) {
        this.productoParametroCollection = productoParametroCollection;
    }

    public List<SolicitudParametro> getSolicitudParametroCollection() {
        return solicitudParametroCollection;
    }

    public void setSolicitudParametroCollection(List<SolicitudParametro> solicitudParametroCollection) {
        this.solicitudParametroCollection = solicitudParametroCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idParametroScoring != null ? idParametroScoring.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ParametroScoring)) {
            return false;
        }
        ParametroScoring other = (ParametroScoring) object;
        if ((this.idParametroScoring == null && other.idParametroScoring != null) || (this.idParametroScoring != null && !this.idParametroScoring.equals(other.idParametroScoring))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.upn.sigemfi.sac.be.ParametroScoring[idParametroScoring=" + idParametroScoring + "]";
    }

}
